//
//  KBaseViewController.h
//  Peanut
//
//  Created by Jim huang on 2018/3/12.
//  Copyright © 2018年 Jim_Peanut. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol KBaseVCGetImageDelegate <NSObject>
@optional
-(void)didGetImage:(UIImage*)image Info:(NSDictionary<NSString *,id> *)info;
/// 用户信息
-(void)pickingMediaWithInfo:(NSDictionary<NSString *,id> *)info;

@end

@interface KBaseViewController : UIViewController

@property (nonatomic, assign) BOOL CameraImageEditing;

@property(nonatomic,weak)id<KBaseVCGetImageDelegate>imageDelegate;

/*获取图片*/
-(void)getImageWithType:(UIImagePickerControllerSourceType)sourceType;

/* MB-HUD */
-(void)showText:(NSString*)text;

-(void)showLoading;
-(void)showLoading:(NSString*)loading;
-(void)showLoading:(NSString *)loading timeout:(NSTimeInterval)time;

-(void)showLoadingProgrss:(CGFloat)progrss;
-(void)showLoadingProgrss:(CGFloat)progrss text:(NSString*)text;

-(void)hideHUD;

/* SVHUD */
-(void)showSuccess:(NSString*)text;
-(void)showErrorText:(NSString*)text;
-(void)showError:(NSError*)error;

@end
